package cn.genmer.test.security.rpc.v2.service.impl;

import cn.genmer.test.security.rpc.v2.service.Car2;
import cn.genmer.test.security.rpc.v2.service.Driver2;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class MyCar2 implements Car2 {
    @Override
    public String start(String name) {
        return "【我的汽车】" + name + "启动成功！日期：" + LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME);
    }

    @Override
    public Driver2 registerDriver(String name, Integer age) {
        Driver2 driver2 = new Driver2();
        driver2.setName(name);
        driver2.setAge(age);
        return driver2;
    }
}